﻿<UserControl x:Class="Chapters.Chapter14.TextBoxHelperExample"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:Chapter14="clr-namespace:FSharp.Chapter14;assembly=FSharpLibrary">
	<UserControl.Resources>
		<!--<Style TargetType="TextBox">
			<Setter Property="BorderBrush"
					Value="#999999" />
			<Setter Property="BorderThickness"
					Value="0" />
			<Setter Property="FontWeight"
					Value="Bold" />
			<Setter Property="FontSize"
					Value="12pt" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="TextBox">
						<Border BorderThickness="1"
								BorderBrush="{TemplateBinding BorderBrush}"
								Background="{TemplateBinding Background}"
								Padding="1"
								SnapsToDevicePixels="True">
							<Grid>
								<ScrollViewer x:Name="PART_ContentHost"
											  Margin="4,0,0,0" />
								<TextBlock x:Name="Watermark"
										   Margin="8,0,0,0"
										   Text="{TemplateBinding Chapter14:TextBoxWatermarkHelper.WatermarkText}"
										   Focusable="False"
										   FontSize="14"
										   FontStyle="Italic"
										   FontFamily="{TemplateBinding FontFamily}"
										   VerticalAlignment="Center"
										   Cursor="IBeam"
										   ForceCursor="True"
										   Foreground="#AF000000" />
							</Grid>
						</Border>

						<ControlTemplate.Triggers>
							<Trigger Property="Chapter14:TextBoxWatermarkHelper.IsWatermarkVisible"
									 Value="True">
								<Setter Property="Visibility"
										Value="Visible"
										TargetName="Watermark" />
								<Setter Property="Visibility"
										Value="Hidden"
										TargetName="PART_ContentHost" />
							</Trigger>
							<Trigger Property="Chapter14:TextBoxWatermarkHelper.IsWatermarkVisible"
									 Value="False">
								<Setter Property="Visibility"
										Value="Hidden"
										TargetName="Watermark" />
								<Setter Property="Visibility"
										Value="Visible"
										TargetName="PART_ContentHost" />
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>-->
	</UserControl.Resources>

	<!--<Grid Height="30"
		  Width="200">
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>

		<TextBox Grid.Column="0"
				 Chapter14:TextBoxWatermarkHelper.WatermarkText="Username"
				 Margin="0,0,8,0" />
		<TextBox Grid.Column="1"
				 Chapter14:TextBoxWatermarkHelper.WatermarkText="Password" />
	</Grid>-->
</UserControl>
